﻿using System;
using System.Collections.Generic;

namespace O1.Data.Traversal
{
    public class Transformation
    {
        public Transformation(int depth, Filter filter, Projection projection)
            : this(depth, filter, projection, null)
        {
        }

        public Transformation(int depth, Filter filter, Projection projection, HashSet<Guid> cycles)
        {
            if (projection == null)
            {
                throw new ArgumentNullException("projection");
            }

            if (filter == null)
            {
                throw new ArgumentNullException("filter");
            }

            this.Filter = filter;
            this.Depth = depth;
            this.Projection = projection;
            this.Cycles = cycles ?? new HashSet<Guid>();
        }

        public HashSet<Guid> Cycles { get; private set; }

        public int Depth { get; private set; }

        public Projection Projection { get; private set; }

        public Filter Filter { get; private set; }
    }
}
